import {createStore,applyMiddleware,compose} from 'redux';//compose是增强的操作测试的时候用
import reducer from './../reducers/index'
import thunk from 'redux-thunk';
import { createLogger } from 'redux-logger'
import DevTools from './DevTools';

const loggerMiddleware  = createLogger();
const middleware  = [thunk,loggerMiddleware];

const finalCreateStore = compose(
    applyMiddleware(...middleware),
    DevTools.instrument()//增强instrument
)(createStore)//绑在createStore上

// const store = createStore(reducer,applyMiddleware(thunk,logger));
export default finalCreateStore;